<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>主页</title>
  <link rel="stylesheet" type="text/css" href="./assets/lib/layui/css/layui.css">
  <link rel="stylesheet" type="text/css" href="./assets/lib/nprogress/nprogress.css">
  <link rel="stylesheet" type="text/css" href="./assets/css/index.css">
  <link rel="stylesheet" type="text/css" href="./assets/fonts/iconfont.css">
  <script type="text/javascript">
    // 判断用户是否已经登录
    var token = sessionStorage.getItem('mytoken')
    if (!token) {
      // 没有登录，跳转到登录页面
      location.href = './login.html'
    }
  </script>
</head>
<body class="layui-layout-body">
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="layui-logo">
        <img src="./assets/images/logo.png" alt="">
      </div>
      <!-- 顶部右侧内容 -->
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <a href="javascript:;" id="header-info">
            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
            <span>贤心</span>
            <!-- LayUI自动生成一个箭头小图标 -->
          </a>
          <dl class="layui-nav-child">
            <dd><a href="">基本资料</a></dd>
            <dd><a href="">更换头像</a></dd>
            <dd><a href="">重置密码</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a id="logout-btn" href="javascript:;"><i class="layui-icon layui-icon-logout"></i>  退了</a></li>
      </ul>
    </div>
    
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <div class="user-info" id="nav-info">
          <!-- 默认头像 -->
          <div class="avatar">U</div>
          <div class="info">欢迎lisi</div>
        </div>
        <ul class="layui-nav layui-nav-tree" lay-shrink='all' lay-filter="test">
          <li class="layui-nav-item layui-this"><a target="rightArea" href="./home/dashboard.html"><i class="layui-icon layui-icon-home"></i>首页</a></li>
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="javascript:;"><i class="layui-icon layui-icon-app"></i>文章管理</a>
            <dl class="layui-nav-child">
              <dd><a target="rightArea" href="./cate/cate-list.html"><i class="layui-icon layui-icon-app"></i>文章分类</a></dd>
              <dd><a target="rightArea" href="./article/article-list.html"><i class="layui-icon layui-icon-app"></i>文章列表</a></dd>
              <dd><a target="rightArea" href="./article/article-publish.html"><i class="layui-icon layui-icon-app"></i>发表文章</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;"><i class="iconfont icon-16"></i>个人中心</a>
            <dl class="layui-nav-child">
              <dd><a target="rightArea" href="./myinfo/info-basic.html"><i class="layui-icon layui-icon-app"></i>基本资料</a></dd>
              <dd><a target="rightArea" href="./myinfo/info-avatar.html"><i class="layui-icon layui-icon-app"></i>更换头像</a></dd>
              <dd><a target="rightArea" href="./myinfo/info-repwd.html"><i class="layui-icon layui-icon-app"></i>重置密码</a></dd>
            </dl>
          </li>
        </ul>
      </div>
    </div>
    
    <div class="layui-body">
      <!-- 内容主体区域 -->
      <iframe name="rightArea" frameborder="0" src="./home/dashboard.html"></iframe>
    </div>
    
    <div class="layui-footer">
      <!-- 底部固定区域 -->
      © www.itheima.com - 黑马程序员
    </div>
  </div>
  <script type="text/javascript" src="./assets/lib/jquery.js"></script>
  <script type="text/javascript" src="./assets/lib/nprogress/nprogress.js"></script>
  <script type="text/javascript" src="./assets/lib/layui/layui.all.js"></script>
  <script type="text/javascript" src="./assets/js/common.js"></script>
  <script type="text/javascript" src="./assets/js/index.js"></script>
</body>
</html>